<?xml version="1.0" encoding="UTF-8"?>
<!-- This is for testing nesting features of complex types that doesn't respect the GML object-property model -->
<as:AppSchemaDataAccess xmlns:as="http://www.geotools.org/app-schema"
                        xmlns:ogc="http://www.opengis.net/ogc" xmlns:xs="http://www.w3.org/2001/XMLSchema"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xsi:schemaLocation="http://www.geotools.org/app-schema AppSchemaDataAccess.xsd
                      http://www.opengis.net/ogc http://schemas.opengis.net/filter/1.1.0/expr.xsd">
  <namespaces>
    <Namespace>
      <prefix>ex</prefix>
      <uri>http://example.com</uri>
    </Namespace>
  </namespaces>
  <sourceDataStores>
    <DataStore>
      <id>SimpleContentDataDirectory</id>
      <parameters>
        <Parameter>
          <name>directory</name>
          <value>file:./</value>
        </Parameter>
      </parameters>
    </DataStore>
  </sourceDataStores>
  <targetTypes>
    <FeatureType>
      <schemaUri>NonValidNestedGML.xsd</schemaUri>
    </FeatureType>
  </targetTypes>
  <typeMappings>
    <FeatureTypeMapping>
      <sourceDataStore>SimpleContentDataDirectory</sourceDataStore>
      <sourceType>SimpleContent</sourceType>
      <targetElement>ex:ParentFeature</targetElement>
      <attributeMappings>
        <AttributeMapping>
          <targetAttribute>ex:ParentFeature</targetAttribute>
          <idExpression><OCQL>ID</OCQL></idExpression>
        </AttributeMapping>
        <AttributeMapping>
          <targetAttribute>ex:parentValue</targetAttribute>
          <sourceExpression>
            <OCQL>STRING</OCQL>
          </sourceExpression>
        </AttributeMapping>
        <AttributeMapping>
          <targetAttribute>ex:nestedFeature</targetAttribute>
          <sourceExpression>
            <OCQL>LINK_TWO</OCQL>
            <linkElement>nestedFeature</linkElement>
            <linkField>FEATURE_LINK[1]</linkField>
          </sourceExpression>
          <isMultiple>true</isMultiple>
        </AttributeMapping>
      </attributeMappings>
    </FeatureTypeMapping>
    <FeatureTypeMapping>
      <mappingName>nestedFeature</mappingName>
      <sourceDataStore>SimpleContentDataDirectory</sourceDataStore>
      <sourceType>SimpleContent</sourceType>
      <targetElement>ex:NestedFeature</targetElement>
      <attributeMappings>
        <AttributeMapping>
          <targetAttribute>ex:NestedFeature</targetAttribute>
          <idExpression>
            <OCQL>ID</OCQL>
          </idExpression>
        </AttributeMapping>
        <AttributeMapping>
          <targetAttribute>ex:nestedValue</targetAttribute>
          <sourceExpression>
            <OCQL>URN_ID</OCQL>
          </sourceExpression>
        </AttributeMapping>
        <AttributeMapping>
          <targetAttribute>FEATURE_LINK[1]</targetAttribute>
          <sourceExpression>
            <OCQL>LINK_TWO</OCQL>
          </sourceExpression>
        </AttributeMapping>
      </attributeMappings>
    </FeatureTypeMapping>
  </typeMappings>
</as:AppSchemaDataAccess>
